#ifndef FOR_STATEMENT_H
#define FOR_STATEMENT_H
#include "AstNode.h"

class CompileVisitor;
class AstNodeBooleanOperator;

class AstNodeForStatement : public AstNode
{
  public:

    AstNodeForStatement(
        AstNode *                   startNode,
        AstNodeBooleanOperator *    cond,
        AstNode *                   nextNode,
        AstNode *                   body);


    virtual void dump(int level=0);

    virtual void compile(CompileVisitor * visitor);

    inline AstNode *                getStartNode() { return startNode; }
    inline AstNodeBooleanOperator * getCond() { return cond; }
    inline AstNode *                getNextNode() { return nextNode; }
    inline AstNode *                getBody() { return body; }

    //virtual int  compile(ClassFile * klass, MethodInfo * method);

  private:
    AstNode *                   startNode;
    AstNodeBooleanOperator *    cond;
    AstNode *                   nextNode;
    AstNode *                   body;
};
#endif
